import { createApp } from "vue";
import App from "./App.vue";
import router from "./router";
import pinia from "./stores";
import { useUserStore } from "./stores/user";
import "./styles/global.scss";

// 创建应用实例
const app = createApp(App);

// 使用插件
app.use(router);
app.use(pinia);

// 初始化用户状态
const userStore = useUserStore();
userStore.initializeFromStorage();

// 挂载应用
app.mount("#app");
